package com.wen.controller;

import com.wen.common.R;
import com.wen.pojo.dto.GatherDetailsDto;
import com.wen.pojo.dto.GatherDto;
import com.wen.service.GatherDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/gatherDetails")
public class GatherDetailsController {
    @Autowired
    private GatherDetailsService service;

    @GetMapping("DetailsById/{id}")
    public R gatherById(@PathVariable String id){
        List<GatherDetailsDto> gatherDetailsDto = service.GatherDetailsById(id);
        return R.ok().data("gatherDetailsDto",gatherDetailsDto);
    }
}
